package main.java.com.rmisorter;

import main.java.com.rmisorter.sorters.ISorter;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class SortFactory extends UnicastRemoteObject implements ISortFactory {
	private static final long serialVersionUID = 1L;

	public SortFactory() throws RemoteException {
		super();
	}
	
	public ISorter createSorter(String sorter) throws RemoteException, Exception  {
		return (ISorter) Class.forName("main.java.com.rmisorter.sorters." + sorter).newInstance();
	}
}